(occur): Stop at end of buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 13 Feb 2001 20:07:50 +0000 (20:07 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 13 Feb 2001 20:07:50 +0000 (20:07 +0000)
lisp/replace.el

index 2a0735cfe5a4ac7ca4feaa0c8a60be9617e33962..469133db8de617992ca3438a1d80c3aeaa6e7957 100644 (file)
@@ -623,7 +623,7 @@ the matching is case-sensitive."
              (goto-char (point-max)))
          (save-excursion
            ;; Find next match, but give up if prev match was at end of buffer.
-           (while (and (not (= prevpos (point-max)))
+           (while (and (not (eobp))
                        (re-search-forward regexp nil t))
              (goto-char (match-beginning 0))
              (beginning-of-line)